#pragma once
#include "UltimateSubsystem.h"
#include "UltimateSubsystemRegistry.h"


class UltimateNetworkSubsystem: public UltimateSubsystem
{
public:
	virtual Ogre::String  getSubsystemName()
	{
		return NETWORK_SUBSYSTEM;
	}


	enum EntitySpotStatus{FREE,OWN,OTHERS,SERVER,SERVER_OTHERS};
	enum EntityNetworkStatus{ALONE,CONNECTED,PLAYING,DISCONNECTED};

	struct EntityNetworkRecord{

		int id;
		EntitySpotStatus entitySpotStatus;
		Ogre::Vector3 position;
		Ogre::Quaternion orientation;
		EntityNetworkStatus entityNetworkStatus;

	};


	virtual void createRecordForPlayer(int id, bool server)=0; 
	virtual void listenOnPort(int port)=0;
	virtual void connectToServer(std::string ip, int port)=0;
	virtual EntityNetworkRecord getRecordForPlayer(int id)=0;
	virtual void setRecordForPlayer(int id, EntityNetworkRecord record)=0;
	virtual void destroyConnection()=0;


	virtual ~UltimateNetworkSubsystem(void){};





};